<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="../jsLib/angular.js"></script>
    <title></title>
</head>
<body>
<div  ng-app="myApp" ng-controller="myCrol">
    <p>{{clock}}</p>
    <p>{{number}}</p>
    <button  ng-click="aa()">aa</button>

</div>
<script>
    var app = angular.module('myApp',[]);
    app.controller('myCrol',function($scope,$http,$timeout){
        $scope.number = 1;
        var updateClock = function () {
            $scope.clock = new Date();
        };
        var updateNumber = function () {
            $scope.number += 1
        };
        $scope.aa=function(){

            var timer = setInterval(function () {
                $scope.$apply(updateClock);
            }, 1000);
            var timer = setInterval(function () {
                $scope.$apply(updateNumber);
            }, 1000);
        }
        updateClock();
    })
</script>
</body>
</html>